// 科室类型
export interface Department {
  id: string;
  name: string;
}

// 医生类型
export interface Doctor {
  id: string;
  name: string;
  departmentId: string;
  title: string;
  schedule: DoctorSchedule[];
}

// 医生排班单元(如“2024-06-01 上午/下午”)
export interface DoctorSchedule {
  date: string; // yyyy-MM-dd
  periods: Array<{
    period: 'morning' | 'afternoon' | 'evening';
    available: boolean;
    timeSlots: string[]; // ['08:00', '08:30', ...]
  }>;
}

// 可被预约的时间段
export interface AppointmentSlot {
  date: string; // yyyy-MM-dd
  period: 'morning' | 'afternoon' | 'evening';
  time: string; // 08:30 等
  doctorId: string;
  departmentId: string;
}

// 预约状态
export type AppointmentStatus = '待就诊' | '已就诊' | '已取消';

// 预约表单数据
export interface AppointmentFormData {
  departmentId: string;
  doctorId: string;
  slot: AppointmentSlot;
  patientName: string;
  patientId: string;
  description: string; // 病情描述
  symptoms: string;
}

// 预约完整数据
export interface Appointment extends AppointmentFormData {
  id: string;
  status: AppointmentStatus;
  createdAt: string;
  updatedAt: string;
}
